<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/common/common.jspf"%>
<section class="m-b-md">
	<header style="width: 100%;">
		<span style="margin-left: 5px;font-size: 14px;">客户信息</span><a style="float: right;margin-right: 30px;" href="javascript:printAll()">打印全部</a>
		<table style="width: 100%;font-size: 12px;margin: 10px;background-color: #F5F5F5">
		  <tr>
		    <td width="25%">姓名：${patient.patient_name}</td>
		    <td width="15%">性别：${patient.patient_sex}</td>
		    <td width="20%">年龄：${patient.patient_age}</td>
		    <td width="40%">客户编号：${patient.patient_number}</td>
		  </tr>
		  <tr>
		  	<td width="25%">电话：${patient.patient_phone}</td>
		    <td colspan="3">地址：${patient.patient_address}</td>
		  </tr>
		</table>
	</header>
	<c:forEach items="${cases}" var="pcase">
		<span style="margin-left: 5px;font-size: 14px;">${pcase.prescription_date}</span> <a style="float: right;margin-right: 30px;" href="javascript:toprint('0','${pcase.case_no}')">打印</a>
		<article style="text-align: left;font-size: 12px;padding: 5px;border: 1px solid green;margin: 5 5 5 5;">
			临床诊断：${pcase.series_name}<br>
			临床表现：${pcase.symptom}<br>
			辩&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp证：${pcase.conclusion}<br>
			治&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp则：${pcase.cure }<br>
			治疗方案：<br>
			<pre style="margin: 5 5 5 5;font-size: 12px;">${pcase.treatment}</pre>
		</article>
	</c:forEach>
	<c:forEach items="${physicals}" var="p">
		<span style="margin-left: 5px;font-size: 14px;">${p.create_time}</span> <a style="float: right;margin-right: 30px;" href="javascript:toprint('1','${p.id}')">打印</a>
		<article style="text-align: left;font-size: 12px;padding: 5px;border: 1px solid green;margin: 5 5 5 5;">
			临床诊断：${p.constitution_result_strings}<br>
			治疗方案：<br>
			<pre style="margin: 5 5 5 5;font-size: 12px;">${p.treatment}</pre>
		</article>
	</c:forEach>
</section>
<script type="text/javascript">
function toprint(type,caseNo){
	if(type=='0'){
		var url = rootPath + '/case/print.shtml?caseFormMap.case_no='+caseNo+'&caseFormMap.type=getcase';
		window.open(url,
				"surveywin",
				"toolbar=yes,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=800,height=600"
				);
	}else{
		var url = rootPath + '/physical/print.shtml?constitutionFormMap.id='+caseNo+'&constitutionFormMap.type=getcase';
		window.open(url,
				"surveywin",
				"toolbar=yes,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=800,height=600"
				);
	}
	
}
function printAll(){
	$("a").hide();
	//document.getElementsByName("a").style.display='none';
	this.print();
	$("a").show();
	//document.getElementsByName("a").style.display='';
}
</script>
